home *** CD-ROM | disk | FTP | other *** search
Wrap
# OpenMarket, Inc # Tue Mar 19 15:33:57 EST 1996 # # $Id: OSL.ofr,v 1.35 1996/07/08 13:59:01 henry Exp $ # # An offer description for a digital offer expected by # Open Market Secure Link. offer { name "OM-Secure Link 2.0 Offer Description" date "Wed May 8 18:18:30 EDT 1996" type env version {OSL 2.01 OMT 2.2} author "OpenMarket Secure Link Software Developer's Kit" generated "vi" translator {<!--#exec cmd="mdohref %s"-->} brand http://www.openmarket.com/offerlibrary/omi.gif } # OSL designates a store as an integer of length 8 (or less). # Most applications will want to call it a 'store', but OM-Transact calls # stores 'key identifiers', for historical reasons. # # The 'prohibited' expression is not necessary. If not stated # explicitly, a row's value is neither required *nor* prohibited. # In other words, its optional. # # By convention (and by convention only), the type information is # usually described as satisfying a regular expression and any # additional constraints are stated in the optional constraint # row attribute. row { name StoreID comment "The identification for your store." tag kid type {expr {[regexp {^[0-9]+$} [getrow StoreID valuedefault]] && [expr {[string length [getrow StoreID valuedefault]] <= 8}] }} } row { name Name tag desc comment "product name or short description" prohibited {expr {[string compare [getrow Type valuedefault] none] == 0} } required {expr { [string compare [getrow Type valuedefault] none] != 0 } } } row { name Type tag "" comment "type of product being offered" type {regexp {^(tangible|online|none)$} [getrow Type valuedefault]} required {return 1} } row { name type tag goodstype comment "this is for internal use only" prohibited {return 1} } row { name UniqueID tag domain comment "unique product identification code, e.g. model number, SKU. For online goods, string or number associated with FulfillmentURL that fulfillment server uses to identify the scope, region, or domain of the online content" constraint { if {[string length [getrow UniqueID valuedefault]] > 40 } {return 0} elseif {![string match [getrow Subscription valuedefault] 1]} {return 1} elseif {![regexp {^[0-9][0-9]*$} [getrow UniqueID valuedefault]]} {return 0} elseif {[getrow UniqueID valuedefault] <= 255} {return 1} else {return 0} } prohibited {expr {[string compare [getrow Type valuedefault] none] == 0} } required {expr { [string compare [getrow Type valuedefault] none] != 0 } } } row { name TaxClass tag ProdCode comment "product classification code used for sales tax calculation" type {expr { [regexp {^[0-9]+$} [getrow TaxClass valuedefault] ] && [expr {[string length [getrow TaxClass valuedefault]] <= 5}] } } prohibited {expr {[string compare [getrow Type valuedefault] none] == 0} } } row { name ShippingWeight tag weight comment "product weight for computing a shipping charge" type {regexp {^[1-9][0-9]*$} [getrow ShippingWeight valuedefault]} prohibited {expr {![string match [getrow Type valuedefault] tangible] || [boundrow ShippingCharge value] || ![string compare [getrow Type valuedefault] none] } } } row { name Detail tag detail comment "descriptive information; reported on merchant's SmartStatement" prohibited {expr { [string match [getrow Subscription valuedefault] 1] || [string match [getrow Type valuedefault] none] } } } row { name StatusURL tag "" comment "merchant-suppied order status page that supercedes the OM-Transact status page" type {regexp {^((http|https)://[^:/]+(:[0-9]+)?)?(.*)} [getrow StatusURL valuedefault]} prohibited {expr {![string match [getrow Type valuedefault] tangible]}} } row { name status_url tag url comment "this is for internal use only" prohibited {return 1} } # # !!!! IMPORTANT # !!!! This row needs special treatment in libdo # !!!! Be extremly careful when you modify it. # row { name FulfillmentURL tag "" comment "on-line location of the product; or the first page of a subscription" type {regexp {^((http|https)://[^:/]+(:[0-9]+)?)?(.*)} [getrow FulfillmentURL valuedefault]} required {string match [getrow Type valuedefault] online} prohibited {expr {![string match [getrow Type valuedefault] online]}} } row { name region_url tag url comment "this is for internal use only" prohibited {return 1} } row { name subs_url tag detail.url comment "this is for internal use only" prohibited {return 1} } row { name url tag url comment "this is for internal use only" prohibited {return 1} } row { name fmt tag fmt comment "this is for internal use only" } row { name Subscription tag "" comment "is online product a subscription?" type {regexp {^[0|1]$} [getrow Subscription valuedefault]} prohibited {expr {![string match [getrow Type valuedefault] online]}} } # # !!!! IMPORTANT # !!!! This row needs special treatment in libdo # !!!! Be extremly careful when you modify it. # row { name SubscriptionDuration tag "" comment "length of subscription in months" type {regexp {^[1-9][0-9]*$} [getrow SubscriptionDuration valuedefault]} required {string match [getrow Subscription valuedefault] 1} prohibited {expr {![string match [getrow Subscription valuedefault] 1]}} } row { name subs_duration tag detail.duration comment "this is for internal use only" prohibited {return 1} } row { name renew tag renew comment "this is for internal use only" prohibited {return 1} } row { name AutoRenew tag "" comment "subscription is automatically renewed when it expires" type {regexp {^[0|1]$} [getrow AutoRenew valuedefault]} prohibited {expr {![string match [getrow Subscription valuedefault] 1]}} } row { name RefundPolicy tag detail.refund comment "subscription refund policy" type {regexp {^(none|prorate|full)$} [getrow RefundPolicy valuedefault]} prohibited {expr {![string match [getrow Subscription valuedefault] 1]}} } row { name Currency tag cc comment "currency code, three digits, ISO 4217." type { regexp {^[0-9A-Za-z][0-9A-Za-z][0-9A-Za-z]?$} [getrow Currency valuedefault] } } row { name Price tag amt comment "offer price" type {regexp {^[0-9]+(\.[0-9]?[0-9]?)?$} [getrow Price valuedefault] } prohibited {string match [getrow Type valuedefault] none } required {expr { [string compare [getrow Type valuedefault] "none"] != 0 } } } row { name Quantity tag qty comment "number of items being purchased" type {regexp {^[1-9][0-9]*$} [getrow Quantity valuedefault]} prohibited {string match [getrow Type valuedefault] none } } row { name MaximumQuantity tag maxqty comment "maximum number of items that can be purchased" type {regexp {^[0-9]+$} [getrow MaximumQuantity valuedefault]} constraint {expr {[getrow MaximumQuantity valuedefault] >= [getrow Quantity valuedefault]} } prohibited {string match [getrow Type valuedefault] none } } row { name InstallmentCount tag n_inst comment "number of payments" type {expr { [regexp {^[1-9][0-9]*$} [getrow InstallmentCount valuedefault] ] && [expr {! [string match [getrow InstallmentCount valuedefault] "1"] }] } } prohibited {expr {![string match [getrow Subscription valuedefault] 1] || [string match [getrow AutoRenew valuedefault] 1] }} required { expr [boundrow InstallmentPeriod valuedefault] } } row { name InstallmentPeriod tag inst comment "number of months between payments" type {regexp {^[1-9][0-9]*$} [getrow InstallmentPeriod valuedefault]} prohibited { expr {![boundrow InstallmentCount valuedefault]} } required { expr [boundrow InstallmentCount valuedefault] } } row { name TrialPeriod tag free comment "period before billing begins" type {regexp {^[0-9]+(d|w|m)?$} [getrow TrialPeriod valuedefault]} prohibited {expr {![string match [getrow Subscription valuedefault] 1]} } } row { name GracePeriod tag grace comment "days before billing is performed" type {regexp {^[0-9]+$} [getrow GracePeriod valuedefault]} prohibited {expr {![string match [getrow Subscription valuedefault] 1]} } } row { name ShippingCharge tag freight comment "fixed shipping charge for the product" type {regexp {^[0-9]*(\.[0-9]?[0-9]?)?$} [getrow ShippingCharge valuedefault]} prohibited {expr {![string match [getrow Type valuedefault] tangible] || [boundrow ShippingWeight value]} } } row { name Operation tag op comment "buyer action" type {regexp {^(add|addview|view)$} [getrow Operation valuedefault] } prohibited { if {[string match [getrow Type valuedefault] none]} {expr {![string match [getrow Operation valuedefault] view]} } else {expr { [string match [getrow Operation valuedefault] view ] }} } required {expr {[string match [getrow Type valuedefault] none]} } } row { name AccountRequired tag acctreqd comment "Is OM-Transact account required" type {regexp {^[0|1]$} [getrow AccountRequired valuedefault] } prohibited {string match [getrow Type valuedefault] none } } row { name OfferExpires tag valid comment "shelf life of the offer, i.e., date after which the offer will no longer be honered by the merchant" type {regexp {^[1-9][0-9]*$} [getrow OfferExpires valuedefault]} prohibited {string match [getrow Type valuedefault] none } } row { name ReceiptDuration tag expire comment "access window, i.e., duration in seconds that the buyer has to access an online product from the time the Digital Receipt is created" type {regexp {^[1-9][0-9]*$} [getrow ReceiptDuration valuedefault]} prohibited {expr {![string match [getrow Type valuedefault] online]}} } row { name OfferURL tag "" type {regexp {^((http|https)://[^:/]+(:[0-9]+)?)?(.*)} [getrow OfferURL valuedefault]} required {expr 1} } row { name curl tag curl comment "this is for internal use only" prohibited {return 1} }